﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Infrastructure.WpfClient.Controls
{
    /// <summary>
    /// Interaction logic for TextEditor.xaml
    /// </summary>
    public partial class TextEditor : UserControl
    {
        public TextEditor()
        {
            InitializeComponent();
        }
        private static readonly DependencyProperty DocumentProperty = DependencyProperty.Register("Document", typeof(string), typeof(TextEditor));
        public string Document
        {
            get { return (string)GetValue(DocumentProperty); }
            set { SetValue(DocumentProperty, value); }
        }
        public FlowDocument FlowDocument
        {
            get { return this.mainRTB.Document; }
        }
        public bool AcceptsTab
        {
            get { return mainRTB.AcceptsTab; }
            set { mainRTB.AcceptsTab = value; }
        }
        public bool SpellCheckIsEnabled
        {
            get { return mainRTB.SpellCheck.IsEnabled; }
            set { mainRTB.SpellCheck.IsEnabled = value; }
        }
    }
}
